package ScreensManager.ProjectScreen 
{
	import Levels.Level;
	import ScreensManager.Screen;
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import ScreensManager.ScreenManager
	/**
	 * ...
	 * @author Thiago Gomes da Silva
	 */
	public class PauseScreen extends Screen
	{
		
		public function PauseScreen() 
		{
			continueButton.buttonMode = true;
			continueButton.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true);
			exitButton.buttonMode = true;
			exitButton.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDownExit, false, 0, true);
		}
		override public function removeListeners():void
		{
			exitButton.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDownExit);
			continueButton.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
		}
		
		override public function drawScreen():void
		{
			Main.getInstance().addChild(this);
		}
		
		private function onMouseDownExit(e:MouseEvent):void
		{
			
			trace("teste");
			ScreenManager.setCurrentScreen(Screens.INTRODUCTION_SCREEN);
			GameScreen.level1.finishMe();
			
		}
		
		
		private function onMouseDown(e:MouseEvent):void
		{
			
			//ScreenManager.setCurrentScreen(Screens.GAME_SCREEN);
			GameScreen.level1.resumeLevel();
		}
		
		
	}

}